#!/bin/bash

#add
#let "z=5**3" # 5^3
#echo $z
#
#let "z=5%3" # 5%3=1 ---2
#echo $z

num=5
let "num +=1";echo $num
let "num *=2";echo $num
let "num++";echo $num
let "num--";echo $num
(( num++ ));echo $num


gcd()
{
	divident=$1
	dividor=$2
	echo "divident=$1"
	echo "dividor=$2"
	remainder=1

	until [ "$remainder" -eq 0 ]; do
		let "remainder = $divident % $dividor"
		divident=$dividor
		dividor=$remainder
	done
}

gcd $1 $2
echo "GCD of $1 and $2 is $divident"
